<p>
  Tracking and managing orders is an important part of an algorithmic trading strategy. Intelligent order management encourages discipline and a deep understanding of your algorithm. Through the QuantConnect API you can get order fields, update their values and cancel pending orders. This can be useful for lowering trading costs and improving order fills.
  When you place a trade you receive an <code>OrderTicket</code> for you to access the order. This allows you to safely (asynchronously) update and cancel the order while in live trading. In live trading you cannot assume order updates are processed successfully as the brokerage may have already filled the trade.
</p>

<p>
  You can place several types of orders including:
</p>

<table class="table qc-table">
<thead>
<tr>
<th colspan="2">Supported Order Types</th>
</tr>
</thead>
<tbody>
<tr>
<td width="25%">Market Order</td>
<td><code class="csharp">var ticket = MarketOrder("SPY", 100);</code><code class="python">self.ticket = self.MarketOrder("SPY", 100)</code></td>
</tr>
<tr>
<td>Limit Order</td>
<td><code class="csharp">var ticket = LimitOrder("SPY", 100, 100.10m);</code><code class="python">self.ticket = self.LimitOrder("SPY", 100, 100.1)</code></td>
</tr>
<tr>
<td>Stop Market Order</td>
<td><code class="csharp">var ticket = StopMarketOrder("SPY", 100, 100.10m);</code><code class="python">self.ticket = self.StopMarketOrder("SPY", 100, 100.1)</code></td>
</tr>
<tr>
<td>Stop Limit Order</td>
<td><code class="csharp">var ticket = StopLimitOrder("SPY", 100, 100.12m, 99.5m);</code><code class="python">self.ticket = self.StopLimitOrder("SPY", 100, 100.12, 99.5)</code></td>
</tr>
<tr>
<td>Market On Open Order</td>
<td><code class="csharp">var ticket = MarketOnOpen("SPY", 100);</code><code class="python">self.ticket = self.MarketOnOpen("SPY", 100)</code></td>
</tr>
<tr>
<td>Market On Close Order</td>
<td><code class="csharp">var ticket = MarketOnClose("SPY", 100);</code><code class="python">self.ticket = self.MarketOnClose("SPY", 100)</code></td>
</tr>
</tbody>
</table>
